<?php
module_load_include('inc', 'lastbuyer', 'ltod');
$timezone = variable_get('date_default_timezone', 0);
?>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery(document).ready(function($) {$("#buy_button_id").click(function(){var modalOptions = {url: '<?php print(url('last_buyer/buy_now/'.$node->nid));?>',autoFit: true};Drupal.modalFrame.open(modalOptions);}); });
//--><!]]>
</script>
<div class="lb-content-main">
	<div class="lb-content-left">
		<img alt="" width="600px"
			src="<?php print($node->last_buyer['image'])?>" />
	</div>
	<div class="lb-content-content">
		<div class="form-item">
			<label>Real price:</label> <span
				style="text-decoration: line-through"><?php print(lb_number_format($node->last_buyer['real_price'],0).$node->last_buyer['currency'])?>
			</span>
		</div>
		<div class="form-item">
			<label>Price:</label>
			<?php print(lb_number_format($node->last_buyer['price'],0).$node->last_buyer['currency'])?>&nbsp;(*)
		</div>
		<div class="form-item">
			<label>Sale off:</label>
			<?php print((($node->last_buyer['real_price']
			    -$node->last_buyer['price']>0)?(lb_number_format(($node->last_buyer['real_price']
			    -$node->last_buyer['price'])*100/$node->last_buyer['real_price'],2)):'0').'%')?>
		</div>
        <?php if($node->last_buyer['number_of_buy_in_day'] >0) : ?>
        <div class="form-item">
			<label>Number of Buy in day:</label>
			<?php print($node->last_buyer['number_of_buy_in_day'])?>
		</div>
        <?php endif; ?>
        <?php if($node->last_buyer['number_of_buy'] >0) : ?>
        <div class="form-item">
			<label>Number of Buy:</label>
			<?php print($node->last_buyer['number_of_buy'])?>
		</div>
        <?php endif; ?>
        <div class="form-item">
            <label>Period:</label>
            <?php if($node->last_buyer['status'] == 1) :?>
            <input type="hidden" id="product-timer-end" value="<?php print($node->last_buyer['end_date'])?>" />
			<input type="hidden" id="product-timer-start" value="<?php print($node->last_buyer['start_date'])?>" />
			<input type="hidden" id="product-timer-now" value="<?php print(time())?>" />
            <?php endif;?>
            <span id="product-timer"><?php if($node->last_buyer['status'] == 2): ?><?php print(t('Expired'));?><?php endif;?></span>
        </div>
        <div class="form-item">
            <a id="buy_button_id" href="#" class="css3Button" title="Mua Ngay">Mua Ngay</a>
		</div>
	</div>
</div>
 <div style="clear: both" > </div>
